import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'ios_microphone_permission_platform_interface.dart';

/// An implementation of [IosMicrophonePermissionPlatform] that uses method channels.
class MethodChannelIosMicrophonePermission extends IosMicrophonePermissionPlatform {
  /// The method channel used to interact with the native platform.
  @visibleForTesting
  final methodChannel = const MethodChannel('ios_microphone_permission');

  @override
  Future<int> getMicrophonePermission() async {
    final status =
    await methodChannel.invokeMethod<int>('getMicrophonePermission');
    return status!;
  }

  @override
  Future<bool> requestMicrophonePermission() async {
    final status =
    await methodChannel.invokeMethod<bool>('requestMicrophonePermission');
    return status!;
  }
}
